
const {
  mrjAsyncBaseReq, //  基本请求
  BaseRequestModel, // 基本请求对象
} = require('./mrhhttp')

const api_action_edit = "/cata/edit"
const api_load_list = "/category/list"
const api_action_add = "/core/merchant/shop/passageway/add"
const api_action_delete = "/core/merchant/shop/passageway/delete"
const api_load_detail = "/core/merchant/shop/passageway/detail"

const CatagoryHttp = {
  loadBindedDevice:async param=>{
    const res = await mrjAsyncBaseReq({
      ...BaseRequestModel,
      url: `${BaseRequestModel.baseUrl}${api_query_binded_device_list}`,
      param: param
    });
    return res.data
  },
  
  
  actionBindDevice:async param=>{
    const res = await mrjAsyncBaseReq({
      ...BaseRequestModel,
      url: `${BaseRequestModel.baseUrl}${api_action_bind_device}`,
      param: param
    });
    return res.data
  },
  actionUnBindDevice:async param=>{
    const res = await mrjAsyncBaseReq({
      ...BaseRequestModel,
      url: `${BaseRequestModel.baseUrl}${api_action_unbind_device}`,
      param: param
    });
    return res.data
  },
  actionDelete:async param=>{
    const res = await mrjAsyncBaseReq({
      ...BaseRequestModel,
      url: `${BaseRequestModel.baseUrl}${api_action_delete}`,
      param: param
    });
    return res.data
  },
  actionAdd:async param=>{
    const res = await mrjAsyncBaseReq({
      ...BaseRequestModel,
      url: `${BaseRequestModel.baseUrl}${api_action_add}`,
      param: param
    });
    return res.data
  },
  actionEdit:async param=>{
    const res = await mrjAsyncBaseReq({
      ...BaseRequestModel,
      url: `${BaseRequestModel.baseUrl}${api_action_edit}`,
      param: param
    });
    return res.data
  },
  loadList:async param=>{
    const res = await mrjAsyncBaseReq({
      ...BaseRequestModel,
      url: `${BaseRequestModel.baseUrl}${api_load_list}`,
      param: param
    });
    return res.data
  },
  loadDetail:async param=>{
    const res = await mrjAsyncBaseReq({
      ...BaseRequestModel,
      url: `${BaseRequestModel.baseUrl}${api_load_detail}`,
      param: param
    });
    return res.data
  },
}
module.exports = CatagoryHttp

